home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / rsc2obj.lzh / RESOURCE / RSC_SHDR.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-05-27  |  541 b   |  26 lines

  1. #include <aes.h>
  2.  
  3. int rsrc_shdr(RSHDR *rsc)
  4. {
  5.     RSHDR    **GEM_rshdr;
  6.     OBJECT    **GEM_rsc;
  7.     OBJECT    *objTree;
  8.     int        obj;
  9.     int        *global = _GemParBlk.global;
  10.     
  11.     if (rsc == (void*)0L)
  12.         return(0);
  13.     
  14.     objTree = *((OBJECT**)(rsc->rsh_trindex + (long)rsc));
  15.     for (obj = 0; obj < rsc->rsh_nobs; obj++)
  16.         rsrc_obfix (objTree, obj);
  17.     
  18.     global[8] = rsc->rsh_rssize;
  19.     GEM_rshdr = (RSHDR **)&global[7];
  20.     *GEM_rshdr = (RSHDR *)rsc;
  21.     GEM_rsc = (OBJECT **)&global[5];
  22.     *GEM_rsc = (OBJECT *)(rsc->rsh_trindex + (long)rsc);
  23.     
  24.     return(1);
  25. }
  26.